void SimplePrint(vector<int> &arr1, int length, string info)
{
	cout << info << endl;
	for (int i = 0; i < length; i++)
	{
		cout << arr1[i] << " ";
	}
	cout << endl;
	return;
}

void SimpleSort(vector<int> &arr1, int length)
{
	SimplePrint(arr1, length, "原始数据：");

	//开始排序
	for (int i = 0; i < length - 1; i++)
	{

		for (int j = i + 1; j < length; j++)
		{
			if (arr1[i] > arr1[j])
			{
				int tmp = arr1[i];
				arr1[i] = arr1[j];
				arr1[j] = tmp;

			}
		}
	}
	//结束排序

	SimplePrint(arr1, length, "排序后的数据：");
	return;
}


int main()
{

	vector<int> arr = {4,32,-2,45,6,10,32,100,10};
	//简单排序，双循环遍历
	SimpleSort(arr,arr.size());

	//QuickSort();
	return 0;
}